<%= field_wrapper(**field_wrapper_args) do %>
  <%= content_tag :div,
    class: class_names("relative block overflow-x-auto max-w-4xl", @input_id),
    data: do %>
    <%= content_tag 'trix-editor',
      class: 'trix-content',
      data: {
        "trix-field-target": "editor",
        **@field.get_html(:data, view: view, element: :input)
      },
      input: @input_id,
      placeholder: @field.placeholder do %>
      <%= sanitize @field.value.to_s %>
    <% end %>
    <%= @form.text_area @field.id,
      value: @field.value.try(:to_trix_html) || @field.value,
      class: classes("w-full hidden"),
      data: @field.get_html(:data, view: view, element: :input),
      disabled: disabled?,
      id: @input_id,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input)
    %>
  <% end %>
<% end %>
